<?php session_start();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<!-- ***********************************
	Programado por Gast�n Briones
	www.gastudio.com.ar
	info@gastudio.com.ar
	Buenos Aires - Argentina
*************************************** -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--<link rel="shortcut icon" href="favicon.ico">-->
<title>Labordecomunicación PANEL DE CONTROL</title>
<!-- JavaScript -->
<script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="jsFrameworks/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="js/jquery.form.js"></script>
<script type="text/javascript" src="js/jquery.confirm-1.0.js"></script>
<script type="text/javascript" src="js/init.js"></script>

<!-- CSS -->
<link href="jsFrameworks/bootstrap/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
<link href="jsFrameworks/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />

</head>
<body>
<div class="container">
	<?php if (isset($_SESSION['s_username'])) {?>
	<form action="phpScripts/login/logoutAction.php" style="float:right" method="post" enctype="multipart/form-data">
		 <button class="btn btn-link inline" type="submit">Salir</button>
	</form>
	<?php }?>
	<div class="page-header">
		<h1>LABORDE COMUNICACÓN<small> Panel de Control</small></h1>
	</div>
	<div id="content">
		<?
		if (!isset($_SESSION['s_username'])) {?>
		<div class="alert alert-info">Acceso administración</div>
		<div class="well">
			<?php 
				if (isset($_SESSION["loginError"])){?>
				<div class="alert alert-error"><b>Error: </b><?php echo $_SESSION["loginError"]; unset($_SESSION["loginError"]); ?></div>	
			<?php }?>
			<form action="phpScripts/login/loginAction.php" method="post" enctype="multipart/form-data" id="formLogin" class="form-horizontal">
				<div class="control-group">
					<label class="control-label" >Usuario:</label>
					<div class="controls">
						<div class="input-append">
							<input type="text" name="username" id="promo-descripcion" required />		
						</div>	
					</div>
				</div>
				<div class="control-group">
					<label class="control-label" >Contraseña:</label>
					<div class="controls">
						<div class="input-append">
							<input type="password" name="password" id="promo-descripcion" required />		
						</div>	
					</div>
				</div>
				<div class="control-group">
					<div class="controls">
						<button type="submit" class="btn btn-info" id="save">Aceptar</button>&nbsp;&nbsp;<img alt="loader" id="imgLoader" style="display:none" src="images/loaderImg.gif">
					</div>
				</div>
			</form>
			<?php }else{?>
				<ul class="nav nav-tabs" id="tabs">
					<li class="active"><a href="#portafolio"  action="phpScripts/portafolio/proyectoFormView.php?action=new">Portafolio</a></li>
					<li><a href="#clientes" action="phpScripts/clientes/clientesFormView.php?action=add">Clientes</a></li>
				</ul>
				<div class="tab-content">
					<div class="tab-pane active" id="portafolio">
						<div class="alert alert-info"><b>Nota:</b> Una vez guardado el proyecto podrá adjuntarle imágenes</div>
						<div class="well">
						    <div class="tabbable tabs-left">
						    	<ul class="nav nav-tabs">
						    		<li class="active"><a href="#portafolioView">Alta</a></li>
						    		<li><a href="#portafolioABM" >Baja y modificacón</a></li>
						    	</ul>
						    	<div class="tab-content">
						    		<div id="portafolioView" class="tab-pane active"></div>
						    		<div id="portafolioABM" class="tab-pane" >
						    			<div id="errorBoxPortafolioABM"></div>
						    			<form class="form-horizontal" id="abmCategoria">
										<div class="control-group">
											<label class="control-label">Categoria</label>
											<div class="controls">
												<?php include 'getCategoriasAction.php';?>				
											</div>
										</div>
										</form>
										<div id="portafolioABMContent"></div>
						    		</div>
						    	</div>
						    </div>	
						</div>
					</div>
					
					<div class="tab-pane" id="clientes">
						<div class="alert alert-info"><b>Nota:</b> Podrás agregar logos de nuevos clientes</div>
						<div class="well">
							 <div class="tabbable tabs-left">
						    	<ul class="nav nav-tabs" id="tabsLeft">
						    		<li class="active"><a href="#clientesView">Alta</a></li>
						    		<li><a href="#clientesABM" action="phpScripts/clientes/clientesListView.php">Baja y modificacón</a></li>
						    	</ul>
						    	<div class="tab-content">
						    		<div id="clientesView" class="tab-pane active"></div>
						    		<div id="clientesABM" class="tab-pane"></div>
						    	</div>
						    </div>							
						</div>
					</div>
				</div>
				
				<!-- Modal -->
				<div id="imagenModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
					<div class="modal-header">
						<h3 id="myModalLabel">Adjuntar imágen</h3>
					</div>
					<div class="modal-body" id="modal-body-imagen">
						
					</div>
					<div class="modal-footer">
						<button class="btn btn-danger" data-dismiss="modal" aria-hidden="true">Terminar</button>			
					</div>
				</div>
			<?php }?>			
		</div>
	</div>	
</div>
</body>
</html>


